LVGL で TEA
code:Browser.document.elm
document :
{ init : flags -> ( model, Cmd msg )
, view : model -> Document msg
, update : msg -> model -> ( model, Cmd msg )
, subscriptions : model -> Sub msg
}
-> Program flags model msg
code:ui.c
struct Command {
};
struct Model model;
struct Model_Command init(…) {
…
return (struct Model.Command) {
.model = …,
.command = …
};
}
void view(struct Model model) {
// TEA ならビューを構築して diff を適用してほしい
// ところだが、それはそれで実装するものが多いので、
// model の diff を見ながら手でビューの差分を適用
// する
}
struct Command update(struct Message message) {
}